Ext.define('TS.view.base.UserCurrent' ,{
    extend: 'Ext.grid.Panel',
    alias : 'widget.usercurrent',
    title : '用户',
    columnLines: true,
    bodyPadding:0,
    frame : true,
    closable: true,
    store: 'base.UsersStore',
    
    initComponent:function(){
    	var rownumber=Ext.create("Ext.grid.RowNumberer");
    	Ext.applyIf(this, {
    		columns:[
	    		rownumber,
	            {header: '用户名',  dataIndex: 'userName',  flex: 1},
	            {
					 header: '是否禁用',
					 dataIndex: 'accountExpired',
					 xtype : "booleancolumn",
					 width:50,
					 trueText:'是',
					 falseText:'否', 
					 flex: 1
				 },{
				 	 header: '是否锁定',
					 dataIndex: 'accountLocked',
					 xtype : "booleancolumn",
					 width:50,
					 trueText:'是',
					 falseText:'否', 
					 flex: 1
				 },{
				 	 header: '是否启用',
					 dataIndex: 'accountEnabled',
					 xtype : "booleancolumn",
					 width:50,
					 trueText:'是',
					 falseText:'否', 
					 flex: 1
				 }
	    	]
    	}),
		this.callParent(arguments);
	},
	listeners: {
		render:{
			fn:function(){
				this.store.load({
		     		params:{userId:loginUser.userId},
		    		callback:function(records, operation, success){
		    		},
			   		scope: this
		    	});
			}
		}
	}
});
